package com.youhome.service.service;

import com.github.pagehelper.PageInfo;
import com.youhome.common.exception.CustomException;
import com.youhome.service.model.Order;
import com.youhome.service.model.Principal;

/**
 * Created by chen365 on 2017/9/13.
 */
public interface OrderService {

    PageInfo<Order> selectByUserId(Long userId, int page, int pageSize) throws Exception;

    Order selectByOrderNo(Principal principal, String orderNo) throws CustomException;

    String submitOrder(Principal principal, Long productid, String ip) throws CustomException;

    Integer orderPay(Order order) throws Exception;

    boolean orderPaySuccess(Order order, Integer pay_type) throws Exception;

    int selectStatusByOrderNo(String orderNo) throws Exception;

    PageInfo<Order> selectByUserId(Principal principal,Integer pageNumber,Integer pageSize) throws CustomException;

    void searchOrderStatus(Principal principal, String orderNo) throws CustomException;

    Order selectByOrderNo(String orderNo);
}
